package com.jiexinyun.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jiexinyun.entity.worktask.WorkTaskMxEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface WorkTaskMxMapper extends BaseMapper<WorkTaskMxEntity> {

    //mybatis写法
    @Select(value = "SELECT CASE WHEN MAX(sx) IS NULL THEN 1 ELSE MAX(sx) END AS sx FROM work_task_mx")
    Integer findSxSort();

}
